import { getToken, setToken, removeToken } from '@/utils/auth'
export default {
  namespaced: true,
  state: {
    token: getToken('token') || ''
  },
  mutations: {
    updateToken(state, token) {
      state.token = token
      setToken(token)
    }
  },
  delToken(state) {
    state.token = ''
    removeToken()
  },
  actions: {}
}
